package com.yang.service;

import com.yang.entity.OrderDetail;
import com.yang.dao.OrderDetailDao;

import java.util.*;

public class OrderDetailService {
    private final OrderDetailDao orderDetailDao = new OrderDetailDao();

    //查询全部
    public List<OrderDetail> queryOrderDetail() {
        return orderDetailDao.queryOrderDetail();
    }

    //单个查询
    public OrderDetail queryOrderDetailById(Integer id) {
        return orderDetailDao.queryOrderDetailById(id);
    }

    //添加
    public int saveOrderDetail(OrderDetail obj) {
        return orderDetailDao.saveOrderDetail(obj);
    }

    //删除
    public int deleteOrderDetailById(Integer id) {
        return orderDetailDao.deleteOrderDetailById(id);
    }

    //修改
    public int updateOrderDetailById(OrderDetail obj) {
        return orderDetailDao.updateOrderDetailById(obj);
    }
}
